This invention relates to a numerical control method and apparatus suitable for application to the cutting of corner portions by a gas or plasma cutting machine.
A so-called data prereading technique is used as a method of reading data in a numerical control apparatus. In a method which does not rely upon the prereading technique, a succeeding block of NC data is read each time machining or movement based on the preceding block ends. This is followed by a format check, decoding, calculation of an amount of movement (incremental values) and by other preprocessing, after which machining or movement is controlled based upon the succeeding block. With this conventional method, however, machining efficiency declines because processing cannot keep up with the action of the machine tool due to the time required for preprocessing and the response of a motor for driving a table or the like. It is for this reason that the above-mentioned data prereading technique has come into use. With this technique, as illustrated in FIG. 1, numerically controlled machining based on the current block, for example, the first block B1, is in progress as indicated at W1, when NC data in the succeeding block B2 is preread. Preprocessing based on the succeeding block B2 is performed concurrently with the NC machining control W1 based on the current block B1. Then, simultaneously with the completion of the NC machining control W1 specified by the current block B1, NC machining control W2 is performed on the basis of the NC data in the succeeding block B2. Therefore, according to the data prereading method, movement based on the NC data in the succeeding block can be executed immediately, without waiting for the completion of preprocessing following movement based on the NC data in the current block. The result is a more efficient machining operation.
The servo loop of a numerical control system is provided with an acceleration/deceleration circuit connected to the output of a pulse distributor in order to prevent a mechanical system from sustaining a shock at the beginning and end of movement. The circuit serves to accelerate and then decelerate the pulse rate of a pulse train generated by the pulse distributor as the result of a pulse distribution computation. FIG. 2 is a block diagram of a servo loop of the kind described above, adapted for the control of two axes, namely the X and Y axes. A pulse distributor PDC receives, as inputs thereto, data Xc, Yc indicating commanded amounts of movement along the X and Y axes, as well as a commanded feed speed Fc, these being input from an NC tape TP. Using these inputs, the pulse distributor PDC performs a known pulse distribution computation to generate distributed pulses Xp, Yp that are applied to acceleration/deceleration circuits ADCX, ADCY, respectively. The acceleration/deceleration circuits ADCX, ADCY function to accelerate the pulse rate of the distributed pulses up to the commanded speed Fc when the pulses begin to arrive and to decelerate the pulse rate when the arrival of distributed pulses is interrupted. Pulses XPC, YPC resulting from the acceleration and deceleration operation of the circuits ADCX, ADCY are applied to respective servo circuits SVX, SVY to movement servomotors SMX, SMY for drive along the X and Y axes, respectively.
A block diagram of and acceleration/deceleration circuit ADCX is illustrated in FIG. 3. It should be noted that the circuit ADCX can control acceleration and deceleration exponentially or linearly. Reference symbol RVC represents a reversible counter for counting up the distributed pulses Xp and for counting down the output pulses XPC. Reference symbol ACC denotes an n-bit accumulator and ADD an adder for adding the contents PE of the reversible counter RVC to the contents of the accumulator ACC whenever a pulse Pa is generated at a constant frequency Fa. When the value in the accumulator ACC exceeds the capacity (2.sup.n) thereof, the pulses XPC emerge from the accumulator at a pulse rate Fc' given by the following: EQU Fc'=Fc[1-exp(-kt)]
Thus the pulse rate Fc' increases exponentially during rise time (acceleration), and decreases exponentially during decay time (deceleration). The acceleration/deceleration circuit ADCX or ADCY can also be constructed to control acceleration and deceleration linearly, in which case Fc' will be given by: EQU Fc'=Fc(kt)
and the pulse rate will increase linearly during rise time and decrease linearly during decay time.
Since the foregoing prereading and acceleration/deceleration control techniques are applied in numerical control systems, an unfortunate result is the rounding of corners when the system is used in the cutting of corner portions. This phenomenon will be described with reference to FIG. 4.
In FIG. 4(A), movements according to blocks B1 and B2 of NC data preceding and following a corner CP intersect at right angles at the corner CP. The preceding block B1 comands movement parallel to the X axis and the following block B2 commonds movement parallel to the Y axis. When cutting a workpiece in accordance with the preceding block B1, the cutting speed along the X-axis decreases exponentially from a commanded speed Vi.sub.x in the vicinity of the corner CP, as shown in FIG. 4(B). On the other hand, a pulse distribution computation based on the command data in the following block B2 starts from a time t.sub.o, which is the instant at which deceleration begins in the preceding block B1 (namely the instant at which the pulse distribution computation ends in block B1), as shown in FIG. 4(C). Accordingly, starting at time t.sub.o, the cutting speed along the Y axis increases exponentially toward a commanded speed Vi.sub.y. In consequence, the corner portion is cut to a rounded configuration as shown by the solid line in FIG. 4(A), rather than to the desired 90.degree. angle.
A tool path is dependent upon the following:
(a) feed speeds (Vi.sub.x and Vi.sub.y) of the tool;
(b) corner angle .theta.;
(c) time constant T1 of acceleration/deceleration during cutting; and
(d) type of motor used. In other words, the difference between a tool path and a commanded path depends upon these parameters. The difference between the tool path and commanded path results in a machining error which is required to be held within allowable limits. To this end, according to the prior art, programming is performed during the creation of an NC tape to set the feed speeds so that the error will fall within the allowable limits, or a dwell command (G04) is inserted between items of command data corresponding to the blocks on either side of a corner, whereby interpolation for a succeeding block starts upon the completion of deceleration in the preceding block, thereby eliminating rounding of the corner portion.
However, the former method involves complicated programming, while the latter method, in which pulse distribution in a succeeding block starts at the end of deceleration, requires a considerable length of time to pass the corner portion. As a result, when a cutting machine such as a gas or plasma cutter is used to cut a workpiece, the corner portion cannot be cut sharply and may instead be cut inaccurately.